package com.syh.jn.scm.domain.upstream.event;

import com.syh.core.ddd.domain.DomainEvent;
import com.syh.jn.scm.domain.upstream.entity.finance.UpIncomeBill;

/**
 * 上游收入单事件
 */
public class UpIncomeBillEvent extends DomainEvent<UpIncomeBill> {
  public static final String UP_INCOME_BILL_CREATE = "upIncomeBillCreate";
  public static final String UP_INCOME_BILL_DESTROY = "upIncomeBillDestroy";
  public static final String UP_INCOME_BILL_STATE_CONFIRM = "upIncomeBillStateConfirm";
  public static final String UP_INCOME_BILL_STATE_UN_CONFIRM = "upIncomeBillStateUnConfirm";

  /**
   * 上游收入单创建事件
   *
   * @param values
   * @return
   */
  public static UpIncomeBillEvent buildCreate(Object[] values) {
    UpIncomeBillEvent upIncomeBillEvent = new UpIncomeBillEvent();
    upIncomeBillEvent.eventName = UP_INCOME_BILL_CREATE;
    upIncomeBillEvent.values = values;
    return upIncomeBillEvent;
  }

  /**
   * 上游收入销毁事件
   *
   * @param values
   * @return
   */
  public static UpIncomeBillEvent buildDestroy(Object[] values) {
    UpIncomeBillEvent upIncomeBillEvent = new UpIncomeBillEvent();
    upIncomeBillEvent.eventName = UP_INCOME_BILL_DESTROY;
    upIncomeBillEvent.values = values;
    return upIncomeBillEvent;
  }

  /**
   * 上游确认收入单
   *
   * @param values
   * @return
   */
  public static UpIncomeBillEvent buildUpIncomeBillStateConfirmEvent(Object[] values) {
    UpIncomeBillEvent upIncomeBillEvent = new UpIncomeBillEvent();
    upIncomeBillEvent.eventName = UP_INCOME_BILL_STATE_CONFIRM;
    upIncomeBillEvent.values = values;
    return upIncomeBillEvent;
  }

  /**
   * 上游取消收入单
   *
   * @param values
   * @return
   */
  public static UpIncomeBillEvent buildUpIncomeBillStateUnConfirmEvent(Object[] values) {
    UpIncomeBillEvent upIncomeBillEvent = new UpIncomeBillEvent();
    upIncomeBillEvent.eventName = UP_INCOME_BILL_STATE_UN_CONFIRM;
    upIncomeBillEvent.values = values;
    return upIncomeBillEvent;
  }
}
